home *** CD-ROM | disk | FTP | other *** search
/ Your Choice 3 / Your Choice Software Collection 3.iso / prgmming / swag05 / textwndw.swg < prev    next >
Encoding:
Text File  |  1994-09-22  |  3.4 KB  |  1 lines

  1. SWAGOLX.EXE (c) 1993 GDSOFT  ALL RIGHTS RESERVED 00001                                                                           1      05-26-9407:31ALL                      SWAG SUPPORT TEAM        Small Window Unit        SWAG9405            26     F╔   πunit windows;ππinterfaceπuses crt;ππprocedure sh;πprocedure sn;πprocedure Drawbox(x1,y1,x2,y2: byte);πprocedure PopWindow(x1,y1,x2,y2: byte);πprocedure CloseWindow;πprocedure Drawshadowbox(x1,y1,x2,y2: byte);πprocedure shh;πprocedure snn;ππconstπ color: boolean = true;ππtypeπ windowtype = recordπ               x1,x2,y1,y2: byte;π               scrsave: array[1..4096] of byte;π              end;π scrarray= array[1..4096] of byte;π scrptr= ^scrarray;πconstπ screenbase: word =$B800;πvarπ numwindows: byte;π ws: array[1..3] of windowtype;π cursorpos: integer;π fileabs: array[1..20] of word;π searchdir: byte;π searchwild: string;π searchdate: string;π searchuploader: string;π searchsize: longint;π searchtext: string;π numindex: word;π sortprimary,sortsecondary: byte;π filelow: longint;π numentries: byte;ππprocedure textcolor(i: byte);πprocedure textbackground(i: byte);ππimplementationππprocedure Textcolor(i: byte);πbegin;π if color then crt.textcolor(i) else begin;π  case i ofπ    0: crt.textcolor(0);π    7: crt.textcolor(7);π   11..15: crt.textcolor(15);π  end;π end;πend;ππprocedure TextBackGround(i: byte);πbegin;π if color then crt.textbackground(i) else begin;π  case i ofπ   0..6: crt.textbackground(0);π   7: crt.textbackground(7);π  end;π end;πend;ππprocedure sh;πbegin;π if color then begin;π  textcolor(blue);π  textbackground(7);π end else begin;π  textcolor(0);π  textbackground(7);π end;πend;ππprocedure sn;πbegin;π textcolor(white);π textbackground(blue);πend;ππprocedure Drawbox(x1,y1,x2,y2: byte);πvarπ x,y: byte;πbegin;π gotoxy(x1,y1);π for x:=x1+1 to x2 do write('═');π gotoxy(x1,y2);π for x:=x1+1 to x2 do write('═');π for y:=y1+1 to y2-1 do begin;π  gotoxy(x1,y);π  write('│');π  gotoxy(x2,y);π  write('│');π end;π gotoxy(x1,y1);π write('╒');π gotoxy(x2,y1);π write('╕');π gotoxy(x1,y2);π write('╘');π gotoxy(x2,y2);π write('╛');πend;ππprocedure PopWindow(x1,y1,x2,y2: byte);πbegin;π inc(numwindows);π ws[numwindows].x1:=lo(windmin)+1;π ws[numwindows].x2:=lo(windmax)+1;π ws[numwindows].y1:=hi(windmin)+1;π ws[numwindows].y2:=hi(windmax)+1;π move(mem[screenbase:0000],ws[numwindows].scrsave,4096);π window(1,1,80,25);π drawbox(x1,y1,x2,y2);π window(x1+1,y1+1,x2-1,y2-1);πend;ππprocedure CloseWindow;πbegin;π move(ws[numwindows].scrsave,mem[screenbase:0000],4096);π window(ws[numwindows].x1,ws[numwindows].y1,ws[numwindows].x2,ws[numwindows].y2);π dec(numwindows);πend;ππprocedure Drawshadowbox(x1,y1,x2,y2: byte);πvarπ x,y: byte;πbegin;π textbackground(0);π textcolor(7);π gotoxy(x1,y1);π for x:=x1+1 to x2 do write('═');π gotoxy(x1,y2);π for x:=x1+1 to x2 do write('═');π for y:=y1+1 to y2-1 do begin;π  gotoxy(x1,y);π  write('│');π  gotoxy(x2,y);π  write('│');π end;π gotoxy(x1,y1);π write('╒');π gotoxy(x2,y1);π write('╕');π gotoxy(x1,y2);π write('╘');π gotoxy(x2,y2);π write('╛');π textcolor(7);π textbackground(0);π for y:=y1+1 to y2+1 do begin;π  gotoxy(x2+1,y);π  write(' ');π end;π for x:=x1+1 to x2+1 do begin;π  gotoxy(x,y2+1);π  write(' ');π end;πend;ππprocedure shh;πbegin;π textcolor(0);π textbackground(7);πend;ππprocedure snn;πbegin;π textcolor(7);π textbackground(0);πend;ππend.